#include <iostream>
#include <cstring>
#include <cmath>
using namespace std;
int main(){
	int n;
	cin>>n;
	double max=0.00;
	while(n--){
		double a,b,c=0.00;
		cin>>a>>b;
		if(a<=10000 && b<=10000){
		c=sqrt(a*a*1.00+b*b*1.00);
		
		if(max<c){
			max=c;
		}			
	}

		
	}
	cout<<max;
	return 0;
} 
